package com.foreveross.service;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.foreveross.common.Constants;
import com.foreveross.dao.HouseLeaseDAO;
import com.foreveross.vo.HouseLease;

@Service("houseLeaseService")
@Transactional
public class HouseLeaseService extends BaseService {

	@Resource
	HouseLeaseDAO houseLeaseDAO;
	
	public long getHouseLeaseListCount(String housingArea,String title,String houseId,
			String minMoney,String maxMoney,String text,String userId) throws Exception{
		return houseLeaseDAO.findHouseLeaseListCount(housingArea,title,houseId, minMoney, maxMoney,text,userId);
	}

	public List<HouseLease> getHouseLeaseList(String housingArea, String title, String houseId,
			String minMoney,String maxMoney,String text,
			int pageIndex,int pageSize,String userId) throws Exception {
		return houseLeaseDAO.findHouseLeaseList(housingArea,title,houseId, minMoney, maxMoney,text,pageIndex,pageSize,userId);
	}
	
	public HouseLease getHouseLeaseById(String id) throws Exception {
		return (HouseLease) houseLeaseDAO.findById(HouseLease.class, id);
	}
	
}
